import http from "@/util/request"

const HomeSwiperData = "/home/swiperdata"
const HomeCatitems = "/home/catitems"
const HomeFloordata = "/home/floordata"
const CategoriesData = "/categories"
const GoodsSearch = "/goods/search"
const GoodsDetail = "/goods/detail"
const GoodsQsearch = "/goods/qsearch"
const WeixinLogin = "/users/wxlogin"

const homeSwiperData = () => {
  return http.request(HomeSwiperData)
}

const homeCatitems = () => {
  return http.request(HomeCatitems)
}

const homeFloordata = () => {
  return http.request(HomeFloordata)
}

const categoriesData = () => {
  return http.request(CategoriesData)
}

const goodsSearch = (param) => {
  return http.request(GoodsSearch, param)
}

const goodsDetail = (param) => {
  return http.request(GoodsDetail, param)
}

const goodsQsearch = (param) => {
  return http.request(GoodsQsearch, param)
}

const weixinLogin = () => {
  return http.request(WeixinLogin)
}

export {
  homeSwiperData,
  homeCatitems,
  homeFloordata,
  categoriesData,
  goodsSearch,
  goodsDetail,
  goodsQsearch,
  weixinLogin,
}
